package com.hgyc.mom.tool.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.hgyc.mom.common.annotation.Excel;
import com.hgyc.mom.core.mybatis.EQ;
import com.hgyc.mom.core.mybatis.Like;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 定时任务调度日志
 * </p>
 *
 * @author fwj
 * @since 2025-05-08
 */
@Data
@TableName("tool_job_log")
@Schema(name="定时任务调度日志对象", description="定时任务调度日志对象")
public class JobLog implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "任务日志ID")
    private Long id;

    @Excel(name = "任务名称")
    @Like
    @Schema(description = "任务名称")
    private String jobName;

    @Excel(name = "任务组名")
    @Like
    @Schema(description = "任务组名")
    private String jobGroup;

    @Excel(name = "调用目标字符串")
    @EQ
    @Schema(description = "调用目标字符串")
    private String invokeTarget;

    @Excel(name = "日志信息")
    @Schema(description = "日志信息")
    private String jobMessage;

    @Excel(name = "执行状态", readConverterExp = "0=正常,1=失败")
    @EQ
    @Schema(description = "执行状态（0正常 1失败）")
    private String status;

    @Excel(name = "异常信息")
    @Schema(description = "异常信息")
    private String exceptionInfo;

    @Schema(description = "开始时间")
    private LocalDateTime startTime;

    @Schema(description = "停止时间")
    private LocalDateTime stopTime;

}